//package com.example.tests;

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.regex.Pattern;

public class Con_PickEvent_TextVerify extends SeleneseTestCase  {
	@Before
	public void setUp() throws Exception {
		selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://www.gfwfn.com/");
		selenium.start();
	}

	@Test
	public void testConHomePage() throws Exception {
		selenium.open("http://www.gofurtherwithfordnight2.com/ZipCodeLookup.php");
		selenium.waitForPageToLoad("30000");
		selenium.type("id=txtZip", "01234");
		selenium.type("id=txtRadius", "10");
		selenium.click("name=submit");
		verifyTrue(selenium.isElementPresent("id=header"));
		verifyTrue(selenium.isElementPresent("css=img[alt=\"Check out the all-new 2013 Fusion\"]"));
		verifyTrue(selenium.isElementPresent("id=header"));
		verifyTrue(selenium.isElementPresent("id=header"));
		verifyTrue(selenium.isElementPresent("css=strong"));
		verifyTrue(selenium.isElementPresent("link=Test Dealership"));
		verifyTrue(selenium.isElementPresent("id=carBlocker"));
		verifyTrue(selenium.isElementPresent("id=cons1c"));
		verifyTrue(selenium.isElementPresent("id=content"));
		verifyTrue(selenium.isElementPresent("link=Test Dealership"));
		verifyTrue(selenium.isTextPresent("Test Dealership\n123 Test Street\n Testertown, CA 01234"));
		verifyTrue(selenium.isTextPresent("Test Dealership\n123 Test Street\n Testertown, CA 01234"));
		verifyTrue(selenium.isTextPresent("CHOOSE THE FORD DEALERSHIP YOU WOULD LIKE TO VISIT!"));
		verifyTrue(selenium.isTextPresent("OR I have a preferred dealer not listed here:"));
		verifyTrue(selenium.isTextPresent("Dealership Name (Required)"));
		verifyTrue(selenium.isTextPresent("City where dealer is located (Required)"));
		verifyTrue(selenium.isElementPresent("id=txtPrefDealerName"));
		verifyTrue(selenium.isElementPresent("id=txtPrefDealerCity"));
		verifyTrue(selenium.isElementPresent("id=prefDealerSubmit"));
		verifyTrue(selenium.isElementPresent("link=www.americanidol.com"));
		verifyTrue(selenium.isElementPresent("link=Official Rules"));
		verifyTrue(selenium.isElementPresent("link=Privacy Statement"));
		verifyTrue(selenium.isElementPresent("link=CA Privacy Statement"));
		verifyTrue(selenium.isElementPresent("css=img[alt=\"Check out the all-new 2013 Fusion\"]"));
		verifyTrue(selenium.isTextPresent("American Idol ®/© 19 TV Ltd. and FremantleMedia North America. 2013 All Rights Reserved. www.americanidol.com\nCharitable donations are the sole responsibility of Ford, not American Idol® or related parties."));
	}
	

	@After
	public void tearDown() throws Exception {
		selenium.stop();
	}
}